package com.gavin.mybatis.service;

import com.gavin.mybatis.mapper.UserInfoMapper;
import com.gavin.mybatis.model.UserInfo;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService  {
    @Autowired
    private UserInfoMapper userInfoMapper;

    public List<UserInfo> getAllUser(){
        return userInfoMapper.selectAll();
    }

    public UserInfo getUserInfoById(Integer id) {
        return userInfoMapper.selectAById(id);
    }
}
